XML Authority Quick Tour


Welcome

To help you become familiar with XML Authoritytm we have included this step-by-step exercise to create a simple schema. This exercise will teach you how to navigate the product and introduce you to the fundamental features of XML Authority. This exercise should take around 15 minutes to complete. For more information about XML Authority, consult the Help Index.

The Example

In this example, you will build a sample Document Type Definition (DTD) for a price list. A document conforming to this schema could be used by a reseller to define the format in which they receive product information from manufacturers. Here is a guide to the information we'll be using.

price.list

the "root" element inside of which all others will appear

manufacturer

a container for information about a manufacturer

name

the name of the manufacturer

date.issued

the date the price list was issued

product

a container for information about a product

sku

the product's sku (Stock Keeping Unit - Inventory Identifier)

product.name

the product's name

price

the product's price

description

a text description of the product

promotion

a container for information about a price promotion

start.date

the date the promotion starts

end.date

the date the promotion ends

NOTE: The use of italics is for identifying the components of the schema and is used throughout this exercise.

For your reference, a complete example of this schema (quicktour.dtd) is included in the Samples directory. (Extensibility \ Samples \ quicktour.dtd)

Getting Started

Here you can define attributes for an element. When entering multiple attributes, they should be separated by commas. XML Authority also has an Attribute Types pane that allows you to refine the attributes further.

NOTE: You can navigate around the tables in each pane by using ENTER, TAB, SHIFT-ENTER, and SHIFT-TAB.

fig 1.4 - Content Model Editor

NOTE: The commas between element types are indicative of a Sequence (this followed by this followed by this). Element types may also represent a Choice (this or this or this). Choice uses a "|" rather than a "," between element type names. In the Content Model column, groups of elements can be EITHER Choices or Sequence.

Notice the price element type is being reused in a different context. That's perfectly okay in some situations, in others you may find it more convenient to use a different element type - the choice is yours.

NOTE: To further refine the definitions of these attributes, you can right-click on each of their names and choose "Go to <name>". This will bring up the Attribute pane with all the information about that attribute. Changing its data type to Date and making it required is left as an exercise for the reader. Use the navigation buttons on the toolbar (fig 1.5) at the top of the screen to move back and forth between the various panes.

fig 1.5 - XML Authority Toolbar

Reviewing the Schema

Graphical view

By defining what elements may be found within what elements, a structure for the document is established. This structure can be thought of as a tree where the "root" is the encompassing element and its branches are the elements that may be contained within it (as defined by the content model). In turn each branch may have branches defined by their content model. The diagram at the top of the Element Types pane provides a graphical view of these relationships. Explore the content model by clicking on the elements to expand and collapse their content. Note that only elements that define a content model can be expanded. Within the diagram, double clicking on the root element, in this case price.list, will produce a graphical view of the entire schema (fig 1.6).

fig 1.6 - Graphical view of completed schema

Right-click on an element in the diagram and choose "Go to Element Type <name>" to make this element active in the list of element type definitions. Right-Click on the background to zoom in or out of the diagram as a whole.

Source view

To view the actual schema syntax for the schema you've created, open the Source Pane by clicking on the Source Pane icon on the main toolbar (fig. 1.5). The Notes pane, which allows you to enter supplemental information about any element type or attribute, also allows you to view the source for individual declarations in a variety of schema dialects as well as in the format of an example XML document. Open the Notes Pane by clicking on the Notes Icon on the main toolbar (fig. 1.5). Click on the "Source Preview" tab at the bottom of the Notes Pane to view the source for the element declaration currently selected in the Elements List Pane. Note the "Preview As..." button which appears in the upper right hand corner of the Notes Pane. Click on this button to view the source in a different dialect or as an example XML document.

Conclusion

This Quick Tour serves as an introduction to XML Authority's basic interface. XML Authority's detailed help documents will help you learn more about XML Authority's functionality and facilitate your implementation of the more advanced features. To help you build better schemas, XML Authority also includes a guide to best practices for schema development.

You can also try out one of the more advanced features of XML Authority by completing the MetaSchema quick tour. In this exercise you will create a template for adorning the schema you just created with additional meta-data.

Thank You for choosing XML Authority from Extensibility.

If you have any questions please contact us at support@extensibility.com

Copyright 2000 Extensibility, Inc.

Suite 250, 200 Franklin Street, Chapel Hill, North Carolina 27516

www.extensibility.com